import java.util.Scanner;

public class Test_array_2 {

    public static void main(String[] args) {
        double[] scores = new double[5];
        Scanner scanner = new Scanner(System.in);
        //记录总成绩
        double sum=0;
        //给5个同学输入成绩
        for(int i=0;i<scores.length;i++){
            System.out.println("请输入第"+(i+1)+"个同学成绩：");
            scores[i]= scanner.nextDouble();
            //计算总成绩
            sum+=scores[i];
        }
        //输入每个同学的成绩
        System.out.println("同学的成绩为：");
        for(int i=0;i<scores.length;i++){
            System.out.print(scores[i]+" ");
        }
        System.out.println("");
        System.out.println("总成绩："+sum);
        System.out.println("平均分成绩："+sum/scores.length);


    }
}
